mui.init();
mui.plusReady(function() {
	//	window.addEventListener('refreshdom', function(event) {
	//		console.log(event.detail.val);
	//		userindex.reqcode(event.detail.val);
	//	})
	var userindex = new Vue({
		el: "#app",
		data: {
			data: {},
			postData: {
				order_id: '',
			},
			order_status:{
				1:'已确认',
				2:'完成',
				3:'取消'
			}

		},
		mounted: function() {
			var _this = this;
			var shareInfo = plus.webview.currentWebview();
			_this.postData.order_id = shareInfo.nid;
			console.log(shareInfo.nid)
			_this.$nextTick(function() {
				_this.cartView();
			});

		},
		methods: {
			cartView: function() {
				var _this = this;
				app.postUrl(apiurl + 'Mall/orderDetail.html', {
					order_id: _this.postData.order_id
				}, function(res) {
					console.log(JSON.stringify(res.data))
					_this.data = res.data;
				});

			},
			refresh: function(done) {
				done();
			},
			infinite: function(done) {
				done();
			},
			openwin: function() {
				var _this = this;
				mui.openWindow({
					url: 'storelist.html',
					id: 'storelist',
					extras: {
						name: 'mui',
						nid: _this.data.store_id,
						title: _this.data.store_name
					}
				});
			}

		}

	});

});